﻿@model IEnumerable<PC.AzureMultiApp.Core.Models.ApplicationModel>

@{
    ViewBag.Title = "Azure Multi App";
}

<h2>Applications</h2>

<p>
    @Html.ActionLink("Deploy New Application", "Create", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Version
        </th>
        <th>
            Status
        </th>
        <th>
           WebApp
        </th>
        <th>
           Web Url
        </th>
        <th>
            Blob Url
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Version)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Status)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsWebDeploy, "Bool")
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ApplicationUrl)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BlobUrl)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", "Edit", new { id = item.UniqueId }, null)  |
            @Html.ActionLink("Delete", "Delete", "Delete", new { id = item.UniqueId }, null) |
            @Html.ActionLink("Update", "Update", "Update", new { id = item.UniqueId }, null)
        </td>
    </tr>
}

</table>
